<!--个人密码修改-->
<?php include('header.php');
	if($_GET['state']=='ok'){
	echo '<script>alert("修改密码成功！");</script>';
	}elseif ($_GET['state']=='error'){
	echo '<script>alert("原始密码错误，请确认后提交！");</script>';
	}elseif ($_GET['state']=='null'){
		echo '<script>alert("原始密码为空，请确认后提交！");</script>';
	}elseif ($_GET['state']=='null1'){
		echo '<script>alert("新密码为空，请确认后提交！");</script>';
	}
	
?>
<link rel="stylesheet" type="text/css" href="css/passwordchange.css">
<div id="mainbody"  >
<div class="col-lg-9" id="charge">
    <div class="panel panel-primary">
   <div class="panel-heading">
      <h3 class="panel-title">修改密码</h3>
   </div>
   <div class="panel-body">
   <!--修改密码表单here!!-->
    <form class="passwordchange" action="../control/passwordchange.php" method="post" >
     <input type="text" id="usercode" name="usercode" style="display: none;" value=<?php echo $_SESSION["usercode"];?> >
    <label class="currentpassword">当前密码：</label><input type="password" id="currenttext" name="currenttext" style="height:30px"><br>
    <label class="newpassword">新密码 :</label><input type="password" id="newtext" name="newtext" style="height:30px" onchange="check1()"><br>
    <label class="reinput">确认新密码:</label><input type="password" id="reinputtext" name="reinputtext"  style="height:30px" onchange="check()"><br>
    <button id="submit" name="submit" >确定修改</button>
    
    </form>
     <!--javascript代码here！！！-->
     <script type="text/javascript">
     function check1(){
    	 var p=document.getElementById("currenttext").value;
    	 if(p==''){
				alert("原密码为空！");
				}
         }
   		function check(){
   	   		
			var new_pass = document.getElementById("newtext").value;
			var check_pass = document.getElementById("reinputtext").value;
			
			if(new_pass=''){
				alert("新密码为空，请确认后点击提交！");
			}
			if(new_pass != check_pass)
				alert("确认的密码与所填写的新密码不相同，请重新确认后点击提交！");
   	   	}
	 </script>
  </div>
   &nbsp;
   <div>  
  		  </div>
</div>


<?php include('foot.php') ?>